﻿function _Man() {
    this._Login = null;

    //Formulario modal para un fin de sesion
    this._LoginModal = function () {
        return true;
    }

    this.InitLogin = function (Cont, usuario, hashkey) {
        var _parent = this;

        //Vemos si existe el estado del postulante
        if (_parent._Login == null) {
            jQuery.getScript(URL_PAGE + "js/app/class/login.js", function () {
                _Login.prototype = new Mantenimiento();
                _parent._Login = new _Login();
                _parent.InitLogin(Cont, usuario, hashkey);
            });
        } else {
            var _Urls = Urls;
            _Urls.Form = URL_PAGE + "Account/FormSession";
            _parent._Login.Init(Cont, _Urls, "All");

            //Agregar el formulario de login Modal
            _parent._LoginModal = function () {
                _parent._Login.LoginFormModal();
            }
            _parent._Login.usuario = usuario;
            _parent._Login.hashkey = hashkey;
            _parent._Login.Form();
        }
    };
}